package com.opeartion.feign;

import com.opeartion.pojo.FindGoods;
import com.opeartion.pojo.Goods;
import feign.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author sanshi
 * @version 1.0
 * @data 2020/6/5-9:30
 */
@Service
@FeignClient(value = "PROVIDER",contextId = "GoodsClient")
public interface GoodsFeign {
    //获取当前所有商品
    @GetMapping("/goods/list")
    List<Goods> goodsList();

    //查询对应的商品
    @PostMapping("/goods/findGoods")
    List<Goods> goodsList(@Param("findGoods") FindGoods findGoods);


}
